package com.xuecheng.ucenter.controller;

import com.xuecheng.api.ucenter.UcenterControllerApi;
import com.xuecheng.framework.domain.ucenter.ext.XcUserExt;
import com.xuecheng.ucenter.service.UcenterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName UcenterController
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/3/11 12:06
 * @since V1.0
 */
@RestController
@Api(value = "用户中心",description = "用户中心管理")
@RequestMapping("ucenter")
public class UcenterController implements UcenterControllerApi {

    @Autowired
    private UcenterService ucenterService;

    @Override
    @ApiOperation("根据账号查询用户信息")
    @GetMapping("/getuserext")
    public XcUserExt getXcUserExt(@RequestParam("username") String username) {
        return ucenterService.getXcUserExt(username);
    }
}
